if (isdedicated || !hasInterface) exitwith {};

RMM_cas_types = [
	"B_Heli_Light_01_armed_F"
];
RMM_cas_lines = [
	{[mapGridPosition player]},
	{[str (group player)]},
	{RMM_cas_types}
];
RMM_cas_missiontime = 600;
RMM_cas_flyinheight = 150;

if (isnil "RMM_cas_frequency") then {
	RMM_cas_frequency = 2700;
	publicvariable "RMM_cas_frequency";
};

if (isnil "RMM_cas_lastTime") then {
	RMM_cas_lastTime = -RMM_cas_frequency;
	publicvariable "RMM_cas_lastTime";
};

if (!isDedicated) then {
	if (isNil "TYR_MENU_IsActive" || {TYR_MENU_IsActive <= 0}) then {
		["player", [mso_interaction_key], -9406, ["tmf\support\modules\rmm_cas\fn_menuDef.sqf", "main"]] call CBA_ui_fnc_add;
		[localize "STR_CAS_MENURADIO","if(call mso_fnc_hasRadio && ([(getPlayerUID player),['leader','admin']] call mp_rights_fnc_hasRoles)) then {createDialog ""RMM_ui_cas""}"] call mso_core_fnc_updateMenu;
	} else {
		if (!isnil "tyr_fnc_addHandler") then {
			["TYRMENU",
				[[
					localize "STR_CAS_MENURADIO"
					,{[(getPlayerUID player),['leader','admin','cas']] call mp_rights_fnc_hasRoles}
					,{createDialog "RMM_ui_cas"}
					,"tmf\support\modules\rmm_cas\chopper.paa"
				]]
			] call tyr_fnc_addHandler;
		};
	};
};